package cn.edu.sdjzu.xg.eagle.entity;

import lombok.*;

import java.io.Serializable;

@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class Department implements Comparable<Department>, Serializable {
    private Long id;
    private String description;
    private String no;
    private String remarks;
    private School school;

    public Department(String description, String no,
                      String remarks, School school) {
        this(description, no, remarks);
        this.school = school;
    }

    public Department(String description, String no,
                      String remarks) {
        this.description = description;
        this.no = no;
        this.remarks = remarks;
    }

    @Override
    public int compareTo(Department o) {
        // no为排序依据
        return this.no.compareTo(o.no);
    }
}
